package org.iteye.bbjava.util.xml2bean;

import org.iteye.bbjava.model.Column;
import org.iteye.bbjava.model.Table;

public class Test {

	public static void main(String[] args) {
		Table t = new Table();
		t.setName("student");
		t.setId(12378787343L);
		Column c = new Column();
		c.setComment("属性值");
		c.setLength(2);
		c.setTableId(12378787343L);
		c.setDbType("varchar");
		t.addColumn(c);
		System.out.println(JaxbUtil.convertToXml(t));
		
		
		String xml = JaxbUtil.convertToXml(t);
		Table tb = JaxbUtil.converyToJavaBean(xml, Table.class);
		System.out.println(tb);
		
		System.out.println(JaxbUtil.convertToXml(tb));
	
	}
}
